/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dat;

import com.casestudy1.main.MainMidlet;
import com.casestudy1.view.View;
import com.sun.lwuit.Command;
import com.sun.lwuit.Display;
import com.sun.lwuit.Label;
import com.sun.lwuit.Tabs;
import com.sun.lwuit.TextArea;
import com.sun.lwuit.animations.CommonTransitions;
import com.sun.lwuit.events.ActionEvent;
import com.sun.lwuit.plaf.Border;
import com.sun.lwuit.util.Resources;
import java.io.IOException;

/**
 *
 * @author PC
 */
public class thongtinrap extends View {

    Command cmBack, cmExit;

    public thongtinrap(final MainMidlet midlet) {
        super(midlet);
        setTitle("Thông tin rạp");
        Resources res = null;
        try {
            res = Resources.open("/mytheme.res");//open resource  

        } catch (IOException e) {
        }

        cmExit = new Command("Thoát") {
            public void actionPerformed(ActionEvent evt) {
                Display.getInstance().exitApplication();
            }
        };

        cmBack = new Command("Quay lại") {
            public void actionPerformed(ActionEvent evt) {

                midlet.showRCPForm();
            }
        };

        setTransitionOutAnimator(CommonTransitions.createSlide(CommonTransitions.SLIDE_HORIZONTAL, false, 1000));


        TextArea ta1 = new TextArea();
        ta1.setText("Địa chỉ:\n87 Láng Hạ-Ba Đình-Hà Nội"
                + "\nĐiện thoại:\n04.35141791-35148647"
                + "\nTuyến bus qua:\n09, 18, 22, 30, 33, 49, 51");
        ta1.setRows(6);
        ta1.setEditable(false);
        ta1.getStyle().setBorder(Border.createEmpty());
        ta1.getStyle().setFgColor(0x00CCFF);


        Tabs tab1 = new Tabs();
        tab1.setTabPlacement(Tabs.TOP);
        tab1.addTab("1", new Label(res.getImage("Image10")));
        tab1.addTab("2", new Label(res.getImage("Image11")));
        tab1.addTab("3", new Label(res.getImage("Image12")));
        tab1.addTab("4", new Label(res.getImage("Image13")));
        tab1.addTab("5", new Label(res.getImage("Image14")));


        addComponent(ta1);
        addComponent(tab1);
        setBackCommand(cmBack);
        addCommand(cmBack);
        addCommand(cmExit);
    }
}
